package com.zxkj.login.model.response;

import com.chad.library.adapter.base.entity.JSectionEntity;
import com.chad.library.adapter.base.entity.SectionEntity;


/**
 * https://github.com/CymChad/BaseRecyclerViewAdapterHelper
 */
public class MySection extends JSectionEntity {
    private boolean isMore;
    private  boolean isHeader;
    public String header;
    public TimelineData t;
    public MySection(boolean isHeader, String header, boolean isMroe) {
       this.isHeader=isHeader;
        this.isMore = isMroe;
        this.header=header;
    }

    public MySection(TimelineData t) {
            this.t=t;
    }

    public boolean isMore() {
        return isMore;
    }

    public void setMore(boolean mroe) {
        isMore = mroe;
    }

    @Override
    public boolean isHeader() {
        return isHeader;
    }
    //R.layout.item_random_check,R.layout.item_heard,list

    /**
     * 重写此方法，返回你的item类型
     */
    @Override
    public int getItemType() {
        if (isHeader()) {
            return SectionEntity.Companion.HEADER_TYPE;
        } else {

            if (t.layoutType==1){
                return 1;
            }else{
                return 2;
            }

        }
    }

}
